package test.library;

import test.library.behavior.IBehavior;
import test.library.behavior.PrintBookList;

public abstract class User{
    String name;
    String identity;
    IBehavior[] behaviors;

    //构造方法
    public User(String name) {
        this.name = name;
    }

    //菜单,返回值为用户输入
    public abstract int menu();

    //用户行为
    public void work(int choice,BookList bookList) {
        IBehavior behavior = behaviors[choice];
        behavior.work(bookList);
        return ;
    }
}
